package org.openwork.portlet.skillmanagement.model;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;


/**
 * <a href="SkillCategorySoap.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * <p>
 * This class is used by
 * {@link org.openwork.portlet.skillmanagement.service.http.SkillCategoryServiceSoap}.
 * </p>
 *
 * @author    Samuel Garcia Martinez
 * @see       org.openwork.portlet.skillmanagement.service.http.SkillCategoryServiceSoap
 * @generated
 */
public class SkillCategorySoap implements Serializable {
    private long _id;
    private long _groupId;
    private long _userId;
    private Date _createDate;
    private Date _modifiedDate;
    private String _name;

    public SkillCategorySoap() {
    }

    public static SkillCategorySoap toSoapModel(SkillCategory model) {
        SkillCategorySoap soapModel = new SkillCategorySoap();

        soapModel.setId(model.getId());
        soapModel.setGroupId(model.getGroupId());
        soapModel.setUserId(model.getUserId());
        soapModel.setCreateDate(model.getCreateDate());
        soapModel.setModifiedDate(model.getModifiedDate());
        soapModel.setName(model.getName());

        return soapModel;
    }

    public static SkillCategorySoap[] toSoapModels(SkillCategory[] models) {
        SkillCategorySoap[] soapModels = new SkillCategorySoap[models.length];

        for (int i = 0; i < models.length; i++) {
            soapModels[i] = toSoapModel(models[i]);
        }

        return soapModels;
    }

    public static SkillCategorySoap[][] toSoapModels(SkillCategory[][] models) {
        SkillCategorySoap[][] soapModels = null;

        if (models.length > 0) {
            soapModels = new SkillCategorySoap[models.length][models[0].length];
        } else {
            soapModels = new SkillCategorySoap[0][0];
        }

        for (int i = 0; i < models.length; i++) {
            soapModels[i] = toSoapModels(models[i]);
        }

        return soapModels;
    }

    public static SkillCategorySoap[] toSoapModels(List<SkillCategory> models) {
        List<SkillCategorySoap> soapModels = new ArrayList<SkillCategorySoap>(models.size());

        for (SkillCategory model : models) {
            soapModels.add(toSoapModel(model));
        }

        return soapModels.toArray(new SkillCategorySoap[soapModels.size()]);
    }

    public long getPrimaryKey() {
        return _id;
    }

    public void setPrimaryKey(long pk) {
        setId(pk);
    }

    public long getId() {
        return _id;
    }

    public void setId(long id) {
        _id = id;
    }

    public long getGroupId() {
        return _groupId;
    }

    public void setGroupId(long groupId) {
        _groupId = groupId;
    }

    public long getUserId() {
        return _userId;
    }

    public void setUserId(long userId) {
        _userId = userId;
    }

    public Date getCreateDate() {
        return _createDate;
    }

    public void setCreateDate(Date createDate) {
        _createDate = createDate;
    }

    public Date getModifiedDate() {
        return _modifiedDate;
    }

    public void setModifiedDate(Date modifiedDate) {
        _modifiedDate = modifiedDate;
    }

    public String getName() {
        return _name;
    }

    public void setName(String name) {
        _name = name;
    }
}
